package ch04.HeteroAST;

import ch04.homoAST.Token;

/**
 * 异型AST节点类型
 */
public abstract class HeteroAST {
    Token token;         // 原始的词法单元

    public HeteroAST()  {}

    public HeteroAST(Token t) {
        token = t;
    }

    public HeteroAST(int tokenType) {
        this.token = new Token(tokenType);
    }

    public String toString() {
        return token.toString();
    }

    public String toStringTree() {
        return toString();
    }


}
